package com.jielin.handling.entity.record;

import com.jielin.handling.entity.vo.record.First;
import com.jielin.handling.entity.vo.record.Two;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 笔录申请查看
 *
 * @author WR 2020-10-13
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RecordApply {
    /**
     * 笔录申请id
     */
    @NotNull(message = "传入的id为null，请传值", groups = First.class)
    @NotEmpty(message = "传入的id空字符串，请传值", groups = First.class)
    private String id;

    /**
     * 关联的笔录详细的id
     */
    @NotNull(message = "传入的recordDetailedId为null，请传值", groups = Two.class)
    @NotEmpty(message = "传入的recordDetailedId空字符串，请传值", groups = Two.class)
    private String recordDetailedId;

    /**
     * 申请警员id
     */
    @NotNull(message = "传入的applyPoliceId为null，请传值", groups = Two.class)
    @NotEmpty(message = "传入的applyPoliceId空字符串，请传值", groups = Two.class)
    private String applyPoliceId;

    /**
     * 提交申请时间
     */
    private Date applyDate;

    /**
     * 申请查看天数(默认7天)
     */
    @NotNull(message = "传入的applyDays为null，请传值", groups = First.class)
    @Range(max = 30, message = "传入的applyDays不合理", groups = First.class)
    private Integer applyDays;

    /**
     * 申请通过时间
     */
    private Date applyPassDate;

    /**
     * 是否同意={0:拒绝;1:同意;2:申请;}(默认申请)
     */
    @NotNull(message = "传入的isPass为null，请传值", groups = First.class)
    @NotEmpty(message = "传入的isPass空字符串，请传值", groups = First.class)
    private String isPass;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 最后一次修改时间
     */
    private Date modifyDate;
}
